/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package br.com.menosehmais.business;

import br.com.caelum.vraptor.ioc.Component;
import br.com.menosehmais.framework.business.CrudBusinessObject;
import br.com.menosehmais.model.PortletViewDO;
import br.com.menosehmais.model.UsuarioDO;
import br.com.menosehmais.persistence.ViewPortletDAO;

/**
 *
 * @author Junior JAFJ
 */
@Component
public class ViewPortletBO extends CrudBusinessObject<PortletViewDO, ViewPortletDAO> {

    public ViewPortletBO (ViewPortletDAO dao) {
        super(dao);
    }

    public long getViews(UsuarioDO usuarioDO) {
        return dao.countByUserId(usuarioDO.getId());
    }
    
}
